{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cb33733e-6f7f-4ab9-a140-5d7fdbefcbfc",
   "metadata": {},
   "source": [
    "# Box Plot\n",
    "\n",
    "A grouped box and whisker plot comparing flipper length distributions by species and sex."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7c355712-5419-4aec-98b0-db123c978ef9",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "\n",
    "df = hvplot.sampledata.penguins('pandas')\n",
    "\n",
    "df.hvplot.box(\n",
    "    y='flipper_length_mm',\n",
    "    by=['species', 'sex'],\n",
    "    title='Grouped Box Plot (Bokeh)',\n",
    "    ylabel='Flipper Length (mm)',\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1bb8668e-692a-4ea6-b37c-6cd9ce1c466b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "df = hvplot.sampledata.penguins('pandas')\n",
    "\n",
    "df.hvplot.box(\n",
    "    y='flipper_length_mm',\n",
    "    by=['species', 'sex'],\n",
    "    title='Grouped Box Plot (Matplotlib)',\n",
    "    ylabel='Flipper Length (mm)',\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "53acc1eb-f6ef-4b5a-a674-fff34b91bf1e",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Box Plot reference documentation](../../ref/api/manual/hvplot.hvPlot.box.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
